package com.gztms.blogmgnt.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gztms.blogmgnt.pojo.Blog;
import com.gztms.blogmgnt.pojo.BlogType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @author Zoey
 * @date 2023/4/23 0:21
 * @Description TODO
 **/
@Mapper
public interface BlogMapper extends BaseMapper<Blog> {

    @Select("select * from blog_type")
    List<BlogType> getAllBlogTypes();

    Page<Blog> getAllBlogs(Page<Blog> page);
}
